To encode or decode a depth image, an intra prediction or an inter prediction may be used. The intra prediction may be performed based on a spatial correlation between coding units, and the inter prediction scheme may be performed based on a temporal correlation between coding units.
In a compression scheme according to a related art, to perform an intra prediction of a depth image, a plurality of modes may be set and a coding mode with the lowest cost may be applied to a coding unit. However, because the depth image has a specific gray level among gray levels of “0” to “255,” a more efficient coding mode may need to be set to reduce a bit rate required when the depth image is transmitted.